<?php

namespace app\admin\validate;

use think\Validate;

class Notice extends Validate {

    /**
     * 规则定义
     * @var array
     */
    protected $rule = [
        'content' => 'require|min:1|max:200',
        'sort'    => 'number|min:1|max:10',
    ];

    /**
     * 提示信息定义
     * @var array
     */
    protected $message = [
        'content' => '请输入1-200位字符公告内容',
        'sort'    => '请输入1-10位数字排序',
    ];

    /**
     * 场景定义
     * @var array
     */
    public $scene = [
        'operateAjax' => ['content', 'sort'],
    ];
}